{% extends "profile.html" %}
{% load i18n %}
{% block menu_entries %}
    <a href="{% url fileshare.views.profile %}">{% trans "my files"|capfirst %}</a>
{% endblock %}


{% block file_list %}
<table>
    <tr class="top" >
        <td>{% trans "link" %}</td>
        <td>{% trans "download count" %}</td>
        <td>{% trans "size" %}</td>
        <td>{% trans "owner" %}</td>
        <td>{% trans "avalible" %}</td>
        <td>{% trans "type" %}</td>
        <td></td>
    </tr>
    {% load mimetype %}
    {% for item in files %}
    <tr>
        <td><a {% if 'image/' in item.name|mimetype %}class="showinbox"{% endif %} href="{% url fileshare.views.download item.uuid item.name %}">{{ item.name }}</a></td>
        <td>{{ item.downloads }}</td>
        <td>{{item.file.size|filesizeformat}}</td>
        <td>{{item.owner}}</td>
        <td>
            <a class="button" href="{% url fileshare.views.change_file_state item.pk %}">{% if item.avalible %} <img src="{{ tick_button }}" alt="{% trans "avalible" %}" /> {% else %} <img src="{{ cross_button }}" alt="{% trans "not avalible" %}" /> {% endif %}</a></td>
        <td>{{ item.name|mimetype }}</td>
        <td><a class="button" href="{% url fileshare.views.delete_file item.pk %}"><img src="{{ delete_button }}" alt="{% trans "delete" %}" /></a></td>
    </tr>
    {% endfor %}
</table>
{% endblock %}
